<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../head.jsp"%>     
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>测试List提交</title>
</head>
<body>
<!-- 封装数据到Collection 对象   -->
 封装数据到Collection 对象 
<form action="${basePath }/collectionandmap/productsListSave.action" method="post">
  <label>产品名称：</label><input name="products[0].productName" type="text">
  <label>产品价格：</label><input name="products[0].productPrice" type="text">
  <br>
  <label>产品名称：</label><input name="products[1].productName" type="text">
  <label>产品价格：</label><input name="products[1].productPrice" type="text">
  <br>
  <hr>
  <input type="submit" value="保存">
</form>
<br>
 封装数据到Map 对象
<form action="${basePath }/collectionandmap/mapSaveProducts.action" method="post">
  <label>产品名称：</label><input name="productsMap['one'].productName" type="text">
  <label>产品价格：</label><input name="productsMap['one'].productPrice" type="text">
  <br>
  <label>产品名称：</label><input name="productsMap['two'].productName" type="text">
  <label>产品价格：</label><input name="productsMap['two'].productPrice" type="text">
  <br>
  <hr>
  <input type="submit" value="保存">
</form>
</body>
</html>